<template>
    <n-tag class="quick-item" size="small" @click="showPopover = !showPopover">配置虚拟用户</n-tag>
    <div id="com_QS_anony_modal" class="quick-item-modal-card quick-item-modal-nomodal">
        <n-modal
            to="#com_QS_anony_modal"
            v-model:show="showPopover"
            :mask-closable="false"
            title="参考配置"
            preset="card"
            draggable
            :trap-focus="false"
            :style="{ maxWidth: '600px' }">
            <div style="">
                <n-code language="js" :code="data" class="quick-code" />
            </div>
        </n-modal>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const showPopover = ref(false)
const data = `
# 启用匿名用户
anonymous_enable=YES
anon_root=/mnt/disk1/anony  # 设置匿名用户根目录

# 限制匿名用户权限
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
anon_world_readable_only=YES  # 仅允许下载可读文件
`
</script>

<style lang="scss">
@use './quick-item.scss';
</style>
